var file_num = 1;
function addFile(link_row)
{
	if(file_num == 5) return;
	var next_file_num = file_num + 1;
	var row = document.createElement('TR');
	var cell1 = document.createElement('TD');
	cell1.innerHTML = "Файл " + next_file_num;
	row.appendChild(cell1);
	var cell2 = document.createElement('TD');
	cell2.innerHTML = "<input type='file' name='file" + next_file_num + "'> <input type='text' name='file" + next_file_num + "_comment' value='Комментарий' onfocus=\"if(this.value == 'Комментарий') this.value='';\" onblur=\"if(this.value == '') this.value='Комментарий';\" style=\"width: 300px; color:#999999;\">";
	row.appendChild(cell2);
	referenceNode = link_row;
	for(var i = 1; i < file_num; i++)
	{
		referenceNode = DOM.next(referenceNode, "TR");
	}
	DOM.insertAfter(link_row.parentNode, row, referenceNode);
	file_num++;
}


